package com.choupin.choupin.entity;

import java.time.LocalDateTime;
import java.util.Objects;

public class Turntable extends BaseEntity {
    private Integer id;//转盘id
    private  String  prizeName;//奖品名称
    private Long    amount;//'奖品数量'
    private Integer turntableId;//转盘分片id
    private String  image;//转盘奖品图片
    private LocalDateTime exchangeTime;//截止兑换时间
    private Integer poolId;//相当于外键，就是_list表的主键

    public Turntable() {
    }

    public Turntable(Integer id, String prizeName, Long amount, Integer turntableId, String image, LocalDateTime exchangeTime, Integer poolId) {
        this.id = id;
        this.prizeName = prizeName;
        this.amount = amount;
        this.turntableId = turntableId;
        this.image = image;
        this.exchangeTime = exchangeTime;
        this.poolId = poolId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPrizeName() {
        return prizeName;
    }

    public void setPrizeName(String prizeName) {
        this.prizeName = prizeName;
    }

    public Long getAmount() {
        return amount;
    }

    public void setAmount(Long amount) {
        this.amount = amount;
    }

    public Integer getTurntableId() {
        return turntableId;
    }

    public void setTurntableId(Integer turntableId) {
        this.turntableId = turntableId;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public LocalDateTime getExchangeTime() {
        return exchangeTime;
    }

    public void setExchangeTime(LocalDateTime exchangeTime) {
        this.exchangeTime = exchangeTime;
    }

    public Integer getPoolId() {
        return poolId;
    }

    public void setPoolId(Integer poolId) {
        this.poolId = poolId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Turntable turntable = (Turntable) o;
        return Objects.equals(id, turntable.id) &&
                Objects.equals(prizeName, turntable.prizeName) &&
                Objects.equals(amount, turntable.amount) &&
                Objects.equals(turntableId, turntable.turntableId) &&
                Objects.equals(image, turntable.image) &&
                Objects.equals(exchangeTime, turntable.exchangeTime) &&
                Objects.equals(poolId, turntable.poolId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, prizeName, amount, turntableId, image, exchangeTime, poolId);
    }

    @Override
    public String toString() {
        return "Turntable{" +
                "id=" + id +
                ", prizeName='" + prizeName + '\'' +
                ", amount=" + amount +
                ", turntableId=" + turntableId +
                ", image='" + image + '\'' +
                ", exchangeTime=" + exchangeTime +
                ", poolId=" + poolId +
                ", createdUser='" + createdUser + '\'' +
                ", createdTime=" + createdTime +
                ", modifiedUser='" + modifiedUser + '\'' +
                ", modifiedTime=" + modifiedTime +
                '}';
    }
}
